{% extends 'base.html' %}
{% block title %}添加科室{% endblock %}

{% block head %}
{{ super() }}
<style>
.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}
.form-title {
    color: #2c3e50;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.5rem;
    font-weight: 500;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}
.form-control:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 0.2rem rgba(74,144,226,0.25);
}
.btn-submit {
    padding: 0.5rem 1.5rem;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}
.btn-submit:hover {
    background-color: #218838;
}
.required-field::after {
    content: "*";
    color: red;
    margin-left: 4px;
}
</style>
{% endblock %}

{% block content %}
<div class="form-container">
    <h2 class="form-title">
        <i class="fas fa-building"></i> 添加新科室
    </h2>
    <form method="post">
        <div class="form-group">
            <label for="name" class="required-field">科室名称</label>
            <input id="name" type="text" name="name" class="form-control" required>
        </div>
        <div class="form-group">
            <label for="leader" class="required-field">负责人</label>
            <input id="leader" type="text" name="leader" class="form-control" required>
        </div>
        <div class="form-group">
            <label for="description" class="required-field">描述</label>
            <input id="description" type="text" name="description" class="form-control" required>
        </div>
        <button type="submit" class="btn-submit">添加</button>
    </form>
</div>
{% endblock %}
